<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../style/default/jsvm.css"/>
<link rel="stylesheet" type="text/css" href="../../style/default/dashboard.css"/>
<script id="j$vm" src="../../jsvm/jsre.js" ></script>
<script src="../../jsvm/jsre-ui.js" ></script>

<style>


</style>
</head>

<body></body>

<script type="text/javascript">

J$VM.exec("Demo",function(System){


    this.prefer({theme: "default"});

    var tabpane = new js.awt.TabPane({
        x: 10, y: 10, width: 640, height:480, tabs: {layout:{hgap:1}}
    }, this);

    this.addComponent(tabpane);
    
    var panel1 = new js.awt.Component({
        css: "background-color:red;"
    }, this.Runtime());

    var panel2 = new js.awt.Component({
        css: "background-color:green;"
    }, this.Runtime());

    var panel3 = new js.awt.Component({
        css: "background-color:blue;"
    }, this.Runtime());

    tabpane.addTab({
        id: "red",
        labelText: "Red"
    }, panel1);

    tabpane.addTab({
        id: "green",
        labelText: "Green"
    }, panel2);

    tabpane.addTab({
        id: "blue",
        labelText: "Blue"
    }, panel3);

    tabpane.doLayout();
    tabpane.activateTab("red");

    tabpane.disableTab("blue");

});
</script>
</html>
